﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
 <style>
     td{
         width:100px;
         text-align:center;
     }
     th{
         text-align:center;
     }
 </style>
    <asp:Button runat="server" ID="btnAdd" Text="添加" OnClick="btnAdd_Click"/>
    <asp:GridView runat="server" ID="moon" AutoGenerateColumns="false" OnRowCancelingEdit="moon_RowCancelingEdit" 
        OnRowDeleting="moon_RowDeleting" OnRowEditing="moon_RowEditing" OnRowUpdating="moon_RowUpdating">
        <Columns>
            <asp:BoundField DataField="id" HeaderText="id" />
             <asp:BoundField DataField="Title" HeaderText="标题" />
             <asp:BoundField DataField="Content" HeaderText="内容" />
             <asp:BoundField DataField="Author" HeaderText="作者" />
             <asp:BoundField DataField="Remarks" HeaderText="备注" />
            <asp:CommandField HeaderText="操作" ShowCancelButton="true" ShowDeleteButton="true" ShowEditButton="true" />
        </Columns>
    </asp:GridView>

</asp:Content>
